﻿using System;
using System.Collections;
using System.Collections.Generic;
using Network;
using TrueSync;
[System.Serializable]
public class KnockdownHitState : StateBase//倒地硬直,怎么处理受身,如果真的是配技能那我就不管了
{
    public override StateEnum StateName
    {
        get
        {
            return StateEnum.KnockdownHit;
        }
    }

    public override void Enter(LogicEntity lEntity, StateBase lastState, object[] stateParams)
    {
        base.Enter(lEntity, lastState, stateParams);
        mLEntity.GetLogicComponent<LogicMoveComponent>().MoveSpeed = TSVector2.zero;
    }

    public override void Excute(FP deltaTime)
    {
        if (statusComponent.HP <= 0)
        {
            mLEntity.GetLogicComponent<LogicStateMachineComponent>().ChangeState(StateEnum.Dead);
            return;
        }

        if(IsFinished())
        {
            mLEntity.GetLogicComponent<LogicStateMachineComponent>().ChangeState(StateEnum.Stand);
        }
    }


    public override void OnStimulate(Stimulate stimulate)
    {
        
    }
}
